.CSS_START_bookDetailsDialog {
  display: none;
}

.c_dialog {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-color: rgb(0 0 0 / 50%);
  transition: 0.2s;
  min-width: 700px;

  &_background {
    position: fixed;
    z-index: 102;
    inset: 0;
  }

  &__box {
    z-index: 102;
    display: flex;
    width: 90%;
    max-width: 92rem;
    margin: 100px auto 20px 5rem;
    padding: 60px;
    background-color: white;
    overflow: hidden auto;
    align-content: flex-start;
    color: #3b3b3b;
    position: relative;
  }

  &__box button {
    position: absolute;
    top: 15px;
    right: 15px;
    height: 50px;
    display: block;
    width: 50px;
    cursor: pointer;
    fill: #3b3b3b;

    svg {
      width: 80%;
    }
  }
}

.dialog_left {
  width: 33%;
  height: fit-content;
  min-width: 9rem;

  & img {
    width: 100%;
    box-shadow: 0 0 20px 0 #cfcfcf;
  }

  & .liens {
    list-style: none;
    padding: 0;

    & li {
      font-size: 1.08rem;
      margin-top: 1rem 0;
      text-align: center;

      & svg {
        display: inline-block;
        vertical-align: top;
        width: 20px;
        height: 20px;
        margin-right: 3px;
      }

      & button {
        font-weight: 600;
      }
    }
  }

  & button,
  & a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.08rem;
    font-weight: 600;
    width: 100%;
    height: unset;
    opacity: 1;

    &.lire {
      display: block;
      text-align: center;
      padding: 8px 10px;
      font-size: 1.1rem;
      margin-top: 24px;
      border: 2px solid #c1c1c1;
      margin-bottom: 32px;
      font-weight: bold;
      border-radius: 2px;
      box-shadow: 0 6px 5px -5px #cfcfcf;
    }
  }

  & button[disabled] {
    cursor: not-allowed;
  }
}

.dialog_right {
  height: fit-content;
  overflow-wrap: break-word;
  width: 77%;
  padding: 0 30px 0 54px;

  h3 {
    font-weight: 600;
    margin-top: 30px;
  }

  #flux_search {
    margin-bottom: 0;
    margin-left: 0;
    height: auto;
    width: fit-content; /* width: 100%; */
    display: flex;
  }

  .author {
    font-size: 1.3rem;
    margin-bottom: 30px;
  }

  h2 {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 1.4rem;
  }

  p {
    margin-top: 0;
    margin-bottom: 3px;
    font-weight: 300;
    font-size: 1.1rem;
  }

  span {
    font-weight: 600;
    font-size: 1.1rem;
  }

  .description {
    font-size: 0.95rem;
  }

  .tags {
    font-size: 1rem;

    ul {
      display: inline-block;
      padding-left: 0;
      margin-top: 0;
    }

    .tag_list {
      display: flex;
    
      & > div {
        display: inline-block;
        margin-left: 15px;
        flex: 1;
      }
    
      & > span {
        align-self: flex-start;
        margin-top: 8px;
        font-weight: 600;
      }
    
      & button {
        width: 20px;
        height: 20px;
        margin-left: 1rem;
        padding: 0;
        border: none;
        background-color: transparent;
    
        &.addTagButton {
          font-size: 1rem;
          font-weight: bold;
          color: rgb(59 59 59);
          height: auto;
          width: auto;
          padding: 0.5rem;
          border: 1px solid rgb(59 59 59);
          border-radius: 5px;
        }
      }
    }

    li {
      display: inline-flex;
      align-items: center;
      background-color: #e7f1fb;
      padding: 2px 6px;
      font-size: 1.1rem;
      border-radius: 3px;
      border: 1px solid #67a3e0;
      color: #67a3e0;
      margin: 0.3rem 0;

      &:not(:first-child) {
        margin-left: 10px;
      }

      svg {
        display: inline-block;
        width: 20px;
        height: 20px;
        vertical-align: top;
      }
    }
  }
}


.c_dialog[aria-hidden="true"] {
  visibility: hidden;
  opacity: 0;
}

.tag_inputs {
  position: relative;
  max-width: 300px;
  flex: 1;
  border-radius: 0;
  border: none;
  height: 35px;
  background-color: transparent;
  color: var(--color-text-primary);
  font-size: 0.9rem;
  border-bottom: 1px solid #c1c1c1;

  &::placeholder {
    font-size: 0.9rem;
    font-weight: 300;
    color: #c1c1c1;
  }
}

.image_wrapper {
  width: 100%;
  position: relative;

  & > div {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;

    & img {
      max-height: 100%;
      max-width: 100%;
      margin: auto;
      display: block;
    }
  }

  &::before {
    content: "";
    display: block;
    padding-top: 140%;
  }
}

.descriptionWrapper {
  max-height: 10rem;
  overflow: hidden;
  position: relative;

  &.hideEnd {
    &::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: linear-gradient(rgb(255 255 255 / 0%), var(--color-neutral-base));
      height: 2rem;
    }
  }

  &.seeMore {
    max-height: unset;

    &::after {
      content: none;
    }
  }
}

.allowUserSelect {
  user-select: text;
}

.opds_book{
  &_infos {
    margin-left: 25%;
    display: flex;
    align-items: center;
    justify-content: start;
    flex-wrap: wrap;
    margin-bottom: 5px;

    .allowUserSelect {
      font-size: smaller;
    }

    strong {
      padding-right: 5px;
    }
  }

  &_state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
  }

  &_available {
    color: green;
  }

  &_unavailable {
    color: var(--color-error-text);
  }
}

.CSS_END_bookDetailsDialog {
  display: none;
}
